package com.lanxin.xxform.services;

import java.util.List;

import com.lanxin.xxform.beans.Answer;

public interface AnswerService {

    int STATUS_NEW      = 1; //新答卷
    int STATUS_REVIEW   = 2; //已阅读
    int STATUS_DISCARD  = 3; //已废弃
    int STATUS_GREAT    = 4; //精选

    /**
     * 创建答卷
     * @param pid
     * @param name
     * @param phone
     * @return
     */
    long createAnswer(long pid, String name, String phone);

    /**
     * 保存答案
     * @param aid
     * @param sid
     * @param content
     * @return
     */
    int saveAnswer(long aid, long sid, String title, String content);

    /**
     * 统计答卷数量
     * @param pid
     * @param status
     * @param keyword
     * @return
     */
    int getCount(long uid, long pid, int status, String keyword);

    /**
     * 获取答卷列表
     * @param offset
     * @param limit
     * @param pid
     * @param status
     * @param keyword
     * @return
     */
    List<Answer> getList(int offset, int limit, long uid, long pid, int status, String keyword);
    
}
